Taking the proteins from the bait and prey lists from the pulldown experiments we would like to make a file containing all interactions between these to build feature vectors from:


In [1]:
cd ../../forGAVIN/pulldown_data/BAITS/


/home/gavin/Documents/MRes/forGAVIN/pulldown_data/BAITS

In [2]:
import csv

In [3]:
f = open("baits_entrez_ids.csv")
baits = list(flatten(csv.reader(f)))
f.close()

In [4]:
cd ../PREYS/


/home/gavin/Documents/MRes/forGAVIN/pulldown_data/PREYS

In [5]:
f = open("prey_entrez_ids.csv")
preys = list(flatten(csv.reader(f)))
f.close()

In [6]:
cd ..


/home/gavin/Documents/MRes/forGAVIN/pulldown_data

In [9]:
import itertools

In [10]:
f = open("pulldown.interactions.Entrez.tsv","w")
c = csv.writer(f,delimiter="\t")
for pair in itertools.combinations(set(baits+preys),2):
    c.writerow(pair)
f.close()